﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

namespace LitTools
{
    [CustomEditor(typeof(ExcelConverter))]
    public class ExcelConverterInspector : Editor
    {
        SerializedProperty excelPath;
        SerializedProperty sheetName;
        SerializedProperty csPath;
        SerializedProperty dataPath;

        private void OnEnable()
        {
            excelPath = serializedObject.FindProperty("excelPath");
            sheetName = serializedObject.FindProperty("sheetName");
            csPath = serializedObject.FindProperty("csPath");
            dataPath = serializedObject.FindProperty("dataPath");
        }

        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            EditorGUILayout.PropertyField(excelPath);
            EditorGUILayout.PropertyField(sheetName);
            EditorGUILayout.PropertyField(csPath);
            EditorGUILayout.PropertyField(dataPath);

            if (GUILayout.Button("创建脚本并读取数据"))
            {

            }

            if (GUILayout.Button("读取数据"))
            {

            }

            if (GUILayout.Button("写入Excel"))
            {

            }

            if (GUILayout.Button("保存转换器"))
            {

            }
            serializedObject.ApplyModifiedProperties();
        }
    }
}
